//
//  WebLoadingViewController.swift
//  Chigo
//
//  Created by 谢成蹊 on 2020/4/30.
//  Copyright © 2020 东信北邮信息技术有限公司. All rights reserved.
//

import UIKit
import WebKit
import SnapKit
class WebLoadingViewController: UIViewController {

    var name: String = ""
    
    var filePath:String = ""
    
    
    var tag = 0

    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.backgroundColor = UIColor.white
        let view1 = WKWebView()
        
        view1.backgroundColor = UIColor.white
        self.view.addSubview(view1)
        view1.snp.makeConstraints { (make) in
            make.left.top.right.bottom.equalToSuperview()

        }
        
        if(tag == 10){
            view1.loadHTMLString(filePath, baseURL: nil)
            return
        }
     
        print("\(filePath)")
        
        let st = filePath.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
        
        print("\(st ?? "")")

        view1.load(URLRequest(url: URL(string: st!)!))

        
      
    }


}
